﻿namespace Mitc.Portal.Services.Category
{
    #region Refer
    using MITC.Portal.Core.Entitys.Category;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Newtonsoft.Json;

    #endregion

    public interface ICategory
    {
        #region CRUD
        /// <summary>
        ///  Create Category 
        /// </summary>
        /// <param name="entity"></param>
        void CreateCategory(CategoryEntity entity);
        void CreateCategory(CategoryEntity entity, out bool flag);
        //Update Category 
        void UpdateCategory(CategoryEntity category);

        //Delete Category
        void DeleteCatetory(CategoryEntity category);

        #endregion

        #region CategoryRole
        /// <summary>
        /// Remove User out of Category 
        /// </summary>
        /// <param name="categoryID"></param>
        /// <param name="loginname"></param>
        void RemoveUser(Guid categoryID, string loginname);
        void RemoveGroup(Guid categoryId, string groupname);
        void AddUserToCategory(Guid categoryId, string loginname);
        void AddGroupToCategory(Guid categoryId, string groupName);
        #endregion

        #region GetCategory

        IEnumerable<CategoryEntity> GetCategory();
        CategoryEntity GetbySiteid(Guid siteId);
        CategoryEntity GetbyName(string catename);
        #endregion 

    }
}
